1 Foreword

This vignette is the fourth procuded during my internship in TIMC-IMAG lab (BCM team). It is divided into two parts. The first one is the visualization of transcription along with heatmap of selected_genes closests DMRs ( window = 100k). The second one offer a new physical gene partition to analyze methylation.

2 Updated genes expression profile

We first divided our genes into 6 bins (-2500,-1500,-500,TSS,+500,+1500,+2500) to overview methylation measures over it. Then, was proposed a second approach by dividing genes into biological regions such as exons, introns etc. The following work flow logically from it : downstream the TSS, the biological regions approach is conserved. Upstream the TSS, the gene is separated into 3 bins : -2500:-1500, -1500:-500 and -500:TSS, to refine our vizualisation.

2.1 Plot per genes

Here are some outputs of a plot_binreg function. For clarity, the large source code is not given here and is available on github. The examples plots are the same as used in the DMRs vignette on purpose.

As you mate note, the closest region to the TSS is sometimes overlapping with the TSS closest bin. It can lead to index a probe in both. This overlap is on purpose since border_indexs of biological regions can be blurred, i thought it was smarter to risk some noise than determine for good the matter.

3 Wide database heatmaps

3.1 Heatmaps superup

We first define a get_indexed_binreg indexing probes as shown in previous plots.

We can now repeat our usual pipeline to visualize obtained results. It is noticeable that Rsd heatmap ( relative squared error), defined as \(\frac{\sigma}{| \mu |} \in [0,+\infty[\), is not well really informative because of its limits properties which are hard to deal with in a algorithmic way.

3.1.1 Healthy tissues

feat_ind <- get_indexed_binreg()
map_binreg<-reduce_map(feat_ind,c("bin1","bin2","bin3","INTER","UTR5","INTRON","CDS","UTR3"))
means_per_regions_per_genes_per_patient_h<- reduce_rows(meth_normal,map_binreg, mean ,na.rm=T)
means_h <- subset_vals_per_bins(data = meth_normal,
                              values_per_patient = means_per_regions_per_genes_per_patient_h,
                              fun = mean,
                              binlist=c("bin1","bin2","bin3","INTER","UTR5","INTRON","CDS","UTR3"))

meth_heatmap(means_h, main = "mean of means superup/healthy")

sd_per_regions_per_genes_per_patient_h <- reduce_rows(meth_normal,map_binreg, sd ,na.rm=T)
sds_h <- subset_vals_per_bins(data = meth_normal,
                            values_per_patient = sd_per_regions_per_genes_per_patient_h,
                            fun = sd,
                            binlist=c("bin1","bin2","bin3","INTER","UTR5","INTRON","CDS","UTR3"))
meth_heatmap(sds_h, main = "mean of sd superup/healthy")

rsd_per_regions_per_genes_per_patient_h <- reduce_rows(meth_normal,map_binreg, rsd ,na.rm=T)
rsds_h <- subset_vals_per_bins(data = meth_normal,
                             values_per_patient = rsd_per_regions_per_genes_per_patient_h,
                             fun = rsd,
                             binlist=c("bin1","bin2","bin3","INTER","UTR5","INTRON","CDS","UTR3"))
meth_heatmap(rsds_h, main = "mean of rsd superup/healthy")

3.1.2 Tumoral tissues

means_per_regions_per_genes_per_patient_t <- reduce_rows(meth_tumoral,map_binreg, mean ,na.rm=T)
means_t <- subset_vals_per_bins(data = meth_tumoral,
                             values_per_patient = means_per_regions_per_genes_per_patient_t,
                             fun = mean,
                             binlist=c("bin1","bin2","bin3","INTER","UTR5","INTRON","CDS","UTR3"))

meth_heatmap(means_t, main = "mean of means superup/tumoral")

sd_per_regions_per_genes_per_patient_t <- reduce_rows(meth_tumoral,map_binreg, sd ,na.rm=T)
sds_t <- subset_vals_per_bins(data = meth_tumoral,
                              values_per_patient = sd_per_regions_per_genes_per_patient_t,
                              fun = sd,
                              binlist=c("bin1","bin2","bin3","INTER","UTR5","INTRON","CDS","UTR3"))
meth_heatmap(sds_t, main = "mean of sd superup/tumoral")

rsd_per_regions_per_genes_per_patient_t <- reduce_rows(meth_tumoral,map_binreg, rsd ,na.rm=T)
rsds_t <- subset_vals_per_bins(data = meth_tumoral,
                            values_per_patient = rsd_per_regions_per_genes_per_patient_t,
                            fun = rsd,
                            binlist=c("bin1","bin2","bin3","INTER","UTR5","INTRON","CDS","UTR3"))
meth_heatmap(rsds_t, main = "mean of rsd superup/tumoral")

3.1.3 Boxplots

boxplot_res(means_h,means_t)

boxplot_res(sds_h,sds_t)

boxplot_res(rsds_h,rsds_t)

3.1.4 Differential values

means_per_regions_per_genes_per_patient_d<- reduce_rows(meth_diff,map_binreg, mean ,na.rm=T)
means_d <- subset_vals_per_bins(data = meth_diff,
                              values_per_patient = means_per_regions_per_genes_per_patient_d,
                              fun = mean,
                              binlist=c("bin1","bin2","bin3","INTER","UTR5","INTRON","CDS","UTR3"))

meth_heatmap(means_d, main = "mean of means superup/differential")

sd_per_regions_per_genes_per_patient_d <- reduce_rows(meth_diff,map_binreg, sd ,na.rm=T)
sds_d <- subset_vals_per_bins(data = meth_diff,
                            values_per_patient = sd_per_regions_per_genes_per_patient_d,
                            fun = sd,
                            binlist=c("bin1","bin2","bin3","INTER","UTR5","INTRON","CDS","UTR3"))
meth_heatmap(sds_d, main = "mean of sd superup/differential")

rsd_per_regions_per_genes_per_patient_d <- reduce_rows(meth_diff,map_binreg, rsd ,na.rm=T)
rsds_d <- subset_vals_per_bins(data = meth_diff,
                             values_per_patient = rsd_per_regions_per_genes_per_patient_d,
                             fun = rsd,
                             binlist=c("bin1","bin2","bin3","INTER","UTR5","INTRON","CDS","UTR3"))
meth_heatmap(rsds_d, main = "mean of rsd superup/differential")

3.2 Heatmaps superdown

3.2.1 Healthy tissues

3.2.2 Tumoral tissues

3.2.3 Boxplots

3.2.4 Differential values

3.3 Heatmap superconserved

3.3.1 Healthy tissues

3.3.2 Tumoral tissues

3.3.3 Boxplots

3.3.4 Differential values

4 Ordered by mean on Intron

4.1 Superup

4.1.1 Healthy tissues

order_index <- order(means_h[,6])
meth_heatmap(means_h, main = "mean of means superup/healthy",order_index=order_index)

meth_heatmap(sds_h, main = "mean of sd superup/healthy", order_index=order_index)

meth_heatmap(rsds_h, main = "mean of rsd superup/healthy",order_index=order_index)

4.1.2 Tumoral tissues

meth_heatmap(means_t, main = "mean of means superup/tumoral",order_index=order_index)

meth_heatmap(sds_t, main = "mean of sd superup/tumoral",order_index=order_index)

meth_heatmap(rsds_t, main = "mean of rsd superup/tumoral",order_index=order_index)

4.1.3 Differential

meth_heatmap(means_d, main = "mean of means superup/differential",order_index=order_index)

meth_heatmap(sds_d, main = "mean of sd superup/differential",order_index=order_index)

meth_heatmap(rsds_d, main = "mean of rsd superup/differential",order_index=order_index)

4.2 Superdown

4.2.1 Healthy tissues

order_index <- order(means_h_d[,6])
meth_heatmap(means_h_d, main = "mean of means superdown/healthy",order_index=order_index)

meth_heatmap(sd_h_d, main = "mean of sd superdown/healthy",order_index=order_index)

meth_heatmap(rsds_h_d, main = "mean of rsd superdown/healthy",order_index=order_index)

4.2.2 Tumoral tissues

meth_heatmap(means_t_d, main = "mean of means superdown/tumoral",order_index=order_index)

meth_heatmap(sd_t_d, main = "mean of sd superdown/tumoral",order_index=order_index)

meth_heatmap(rsds_t_d, main = "mean of rsd superdown/tumoral",order_index=order_index)

4.2.3 Differential

meth_heatmap(means_d_d, main = "mean of means superdown/diff",order_index=order_index)

meth_heatmap(sd_d_d, main = "mean of sd superdown/diff",order_index=order_index)

meth_heatmap(rsds_d_d, main = "mean of rsd superdown/diff",order_index=order_index)

4.3 Supercons

4.3.1 Healthy tissues

order_index <- order(means_h_c[,6])
meth_heatmap(means_h_c, main = "mean of means supercons/healthy",order_index=order_index)

meth_heatmap(sd_h_c, main = "mean of sd supercons/healthy",order_index=order_index)

meth_heatmap(rsds_h_c, main = "mean of rsd supercons/healthy",order_index=order_index)

4.3.2 Tumoral tissues

meth_heatmap(means_t_c, main = "mean of means supercons/tumoral",order_index=order_index)

meth_heatmap(sd_t_c, main = "mean of sd supercons/tumoral",order_index=order_index)

meth_heatmap(rsds_t_c, main = "mean of rsd supercons/tumoral",order_index=order_index)

4.3.3 Differential

meth_heatmap(means_d_c, main = "mean of means supercons/diff",order_index=order_index)

meth_heatmap(sd_d_c, main = "mean of sd supercons/diff",order_index=order_index)

meth_heatmap(rsds_d_c, main = "mean of rsd supercons/diff",order_index=order_index)

5 order_indexed by bin3 (closest one to the TSS)

5.1 Superup

5.1.1 Healthy tissues

order_index <- order(means_h[,3])
meth_heatmap(means_h, main = "mean of means superup/healthy",order_index=order_index)

meth_heatmap(sds_h, main = "mean of sd superup/healthy", order_index=order_index)

meth_heatmap(rsds_h, main = "mean of rsd superup/healthy",order_index=order_index)

5.1.2 Tumoral tissues

meth_heatmap(means_t, main = "mean of means superup/tumoral",order_index=order_index)

meth_heatmap(sds_t, main = "mean of sd superup/tumoral",order_index=order_index)

meth_heatmap(rsds_t, main = "mean of rsd superup/tumoral",order_index=order_index)

5.1.3 Differential

meth_heatmap(means_d, main = "mean of means superup/differential",order_index=order_index)

meth_heatmap(sds_d, main = "mean of sd superup/differential",order_index=order_index)

meth_heatmap(rsds_d, main = "mean of rsd superup/differential",order_index=order_index)

5.2 Superdown

5.2.1 Healthy tissues

order_index <- order(means_h_d[,3])
meth_heatmap(means_h_d, main = "mean of means superdown/healthy",order_index=order_index)

meth_heatmap(sd_h_d, main = "mean of sd superdown/healthy",order_index=order_index)

meth_heatmap(rsds_h_d, main = "mean of rsd superdown/healthy",order_index=order_index)

5.2.2 Tumoral tissues

meth_heatmap(means_t_d, main = "mean of means superdown/tumoral",order_index=order_index)

meth_heatmap(sd_t_d, main = "mean of sd superdown/tumoral",order_index=order_index)

meth_heatmap(rsds_t_d, main = "mean of rsd superdown/tumoral",order_index=order_index)

5.2.3 Differential

meth_heatmap(means_d_d, main = "mean of means superdown/diff",order_index=order_index)

meth_heatmap(sd_d_d, main = "mean of sd superdown/diff",order_index=order_index)

meth_heatmap(rsds_d_d, main = "mean of rsd superdown/diff",order_index=order_index)

5.3 Supercons

5.3.1 Healthy tissues

order_index <- order(means_h_c[,3])
meth_heatmap(means_h_c, main = "mean of means supercons/healthy",order_index=order_index)

meth_heatmap(sd_h_c, main = "mean of sd supercons/healthy",order_index=order_index)

meth_heatmap(rsds_h_c, main = "mean of rsd supercons/healthy",order_index=order_index)

5.3.2 Tumoral tissues

meth_heatmap(means_t_c, main = "mean of means supercons/tumoral",order_index=order_index)

meth_heatmap(sd_t_c, main = "mean of sd supercons/tumoral",order_index=order_index)

meth_heatmap(rsds_t_c, main = "mean of rsd supercons/tumoral",order_index=order_index)

5.3.3 Differential

meth_heatmap(means_d_c, main = "mean of means supercons/diff",order_index=order_index)

meth_heatmap(sd_d_c, main = "mean of sd supercons/diff",order_index=order_index)

meth_heatmap(rsds_d_c, main = "mean of rsd supercons/diff",order_index=order_index)